package com.cqgc.service.impl;

import com.cqgc.dao.BarnDao;
import com.cqgc.dao.HarvestDao;
import com.cqgc.domain.Barn;
import com.cqgc.domain.PageHelper;
import com.cqgc.service.BarnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BarnServiceImpl implements BarnService {
    @Autowired
    private BarnDao dao;
    @Override
    public List<Barn> findAll(PageHelper pageHelper) {
        return dao.findAll(pageHelper);
    }
    @Override
    public List<Barn> findAllBarn() {
        return dao.findAllBarn();
    }

    @Override
    public Barn findBarnByBid(int bid) {
        return dao.findBarnByBid(bid);
    }
    @Override
    public int editBarn(Barn barn) {
        return dao.editBarn(barn);
    }

    @Override
    public int addBarn(Barn barn) {
        return dao.addBarn(barn);
    }

    @Override
    public int deleteBarn(Barn barn) {
        return dao.deleteBarn(barn);
    }

    @Override
    public int banBarn(Barn barn) {
        return dao.banBarn(barn);
    }


}
